<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>全国干线公路养护管理规范化检查评分系统</title>
<block th:replace="commonBase"></block>
<link rel="stylesheet"
	th:href="@{/common/js/miniui/res/font-awesome/css/font-awesome.min.css}" />
<link th:href="@{/common/frame/frame1/res/menu/menu.css}"
	rel="stylesheet" type="text/css" />
<script th:src="@{/common/frame/frame1/res/menu/menu.js}"
	type="text/javascript"></script>
<link th:href="@{/common/frame/frame1/res/tabs.css}" rel="stylesheet"
	type="text/css" />
<link th:href="@{/common/frame/frame1/res/frame.css}" rel="stylesheet"
	type="text/css" />
<link th:href="@{/common/frame/frame1/res/index.css}" rel="stylesheet"
	type="text/css" />

<link rel="stylesheet" th:href="@{/plugins/layui/css/layui.css}"/>
 <script th:src="@{/plugins/layui/layui.js}" type="text/javascript"></script>
 <link th:href="@{/common/frame/frame1/res/kz_style.css}"
	rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="headid"  class="navbar" style="height: 72px;margin-bottom: 0px;">
		<div class="nav navbar-nav top-menu">
			
			<table style="padding-left: 42px; margin-top: 15px;">
				<tr>
					<td rowspan="2" align="right"><div
							style="margin-top: 2px; padding-right: 2px;">
							<img style="width:55px;height: 55px;margin-top: -5px;margin-left: 30px;" th:src="@{/common/images/slogo.png}" />
						</div></td>
					<td><div
							style="font-family: 微软雅黑; font-size: 28px; margin-left: 10px;margin-top: -7px; color: #008e98;font-weight: bold;"
							id="systemNameId">全国干线公路养护管理规范化检查评分系统</div></td>
				</tr>
			</table>
			
			<!-- 
			<table style="padding-left: 42px;margin-top: 10px; "> 
				<tr>
					<td rowspan="2" align="right"><div style="margin-top: 2px;padding-right: 2px;"><img th:src="@{/common/images/logo1.png}" /></div></td>
					<td ><div
							style="font-family: 微软雅黑; font-size: 22px; margin-left: 5px; color: #fff;">
							全国干线公路养护管理规范化检查评分系统
							</div></td>
				</tr>
				<tr>
					<td><span style="font-family: 微软雅黑;font-size: 15px; color: #fff;margin-left: 6px;">National Highway Management System</span></td>
				</tr>

			</table> -->
		</div>
			<ul class="nav navbar-nav navbar-right"  id="menunav">
				<li class="dropdown" style="padding-top: 8px;">
				<a class="dropdown-toggle userinfo"> <img id="imgnva"
						class="user-img" th:src="@{/downloadforlayui}" /><span class="hidden-xs" style="font-family: 微软雅黑;font-size: 14px;" th:text="${user.name}"></span>
				</a>
				<ul class="dropdown-menu pull-right"  style="top:68px;">
						<li><a href="javascript:void(0);" onclick="showperson()"><i class="fa fa-user "></i>个人中心</a></li>
						<li class="divider"></li>
						<li><a href="javascript:void(0);" onclick="showhelp()"> <i class="fa fa-question-circle-o"></i>帮助文档</a></li>
						<li><a href="javascript:void(0);" onclick="logout()"><i class="fa fa-sign-out "></i>退出登录</a></li>
				</ul></li>
			</ul>
	</div>

	<!-- style="color: #999;font-size: 15px;line-height: 48px;" -->
	<div class="layui-tab layui-tab-brief" lay-filter="main" style="height: 48px;box-shadow: 0 2px 4px 0 rgba(212,210,210,0.50);border-top: solid 2px #008e98;">
	  <ul class="layui-tab-title"  style="height: 48px;">
	    <li th:each="mods,userStat:${user.systems}" th:if="${userStat.index} eq 0" style="margin-left: 36px;"  class="layui-this"><a id="layui-this"
		    class="xtcls"
		     href="javascript:void(0);"
						th:onclick="'javascript:loadPage(\''+${mods.id}+'\',\''+${mods.serverId}+'\',\''+${mods.moduleLink}+'\');'"><i
							th:attr="class=${mods.iconCls}"></i><span style="margin-left: 2px;font-size: 16px;"
							th:text="${mods.moduleName}"></span></a>
		</li>
		 <li th:each="mods,userStat:${user.systems}" th:if="${userStat.index} ne 0" ><a
		    class="xtcls"
		     href="javascript:void(0);"
						th:onclick="'javascript:loadPage(\''+${mods.id}+'\',\''+${mods.serverId}+'\',\''+${mods.moduleLink}+'\');'"><i
							th:attr="class=${mods.iconCls}"></i><span style="margin-left: 2px;"
							th:text="${mods.moduleName}"></span></a>
		</li>
	  </ul>
	   <li id="ssid" style="width: 30px;position: absolute;top: 76px;right: 2px;font-size:30px;" title="收起"><a href="javascript:void(0);" onclick="fullscreen()"><i class="fa fa-angle-double-up" ></i></a></li>
	  <li id="zkid" style="width: 30px;position: absolute;top: 2px;right: 2px;display: none;font-size:30px;"  title="展开"><a  href="javascript:void(0);" onclick="zkscreen()"><i class="fa fa-angle-double-down"></i></a></li>
	</div> 
	<div style="height: 5px;width: 100%;background-color: #f7f7f7;"></div>
	<div class="mini-fit" style="overflow-y:hidden;">
	    	<iframe id="contextframe"
							name="iframe0" width="100%" height="100%" 
							frameborder="0"></iframe>
	 </div>
</body>
<script th:inline="javascript" type="text/javascript">
 /*<![CDATA[*/
 	
 	
	 
	var cotextRoot = /*[[@{/}]]*/

	var layer=null;
	
	layui.use(['layer','element'], function(){
		  var $ = layui.jquery
		  ,element = layui.element, layer = layui.layer; //Tab的切换功能，切换事件监听等，需要依赖element模块
	});

	function fullscreen(){
		$("#headid").hide();
		$("#zkid").show();
		mini.parse();
	}

	function zkscreen(){
		$("#headid").show();
		$("#zkid").hide();
		mini.parse();
	}

	 //加载整个页面
    function loadPage(aid,serverId,link){
        if(link && null != link && ""!= link){
        	//$('body').attr("class","compact");
            // mini.layout();
        	if(null == serverId || '' ==serverId || 'null' == serverId){
      	 		$("#contextframe").attr("src",cotextRoot+link);
        	}else{
        		$("#contextframe").attr("src",serverId+link);
            }
        }else{
			//alert("in");
        	//$('body').attr("class","");
        	$("#contextframe").attr("src",basePath+"index2?sysId="+aid);
        }
   		
    }

    function showperson(){
     	layer.open({
    		  closeBtn:1,
    		  type: 2,
    		  /* shade: [0.6, '#b3b3b3'], */
    		  shadeClose:true,
    		  title:"个人中心",
    		  skin: 'layui-layer-lan', //加上边框
    		  area: ['650px', '450px'], //宽高
    		  content: basePath+'personal'
    		}); 
    }


    function showhelp(){
      	layer.open({
  		  closeBtn:1,
  		  type: 2,
  		  maxmin: true,
  		  /* shade: [0.6, '#b3b3b3'], */
  		  shadeClose:true,
  		  title:"帮助文档",
  		  skin: 'layui-layer-lan', //加上边框
  		  area: ['800px', '550px'], //宽高
  		  content: basePath+'help'
  		}); 
    }
    
    var wait = null;
    function checkUKEY(){
    	 $.ajax({
    			url:basePath+"checkUKEY",
    			type:"post",
    			data:null,
    			success:function(val){
    				if("1"  != val){
    					clearInterval(wait); 
    					mini.alert('您的账号在其他设备上登录,请重新登录！！！',"提示",function(){ 
    						 window.location.replace(basePath+"index");
    		            });
    				}
    			},
    			error:function(e){
    				clearInterval(wait); 
    				mini.alert('您的账号在其他设备上登录,请重新登录！！！',"提示",function(){ 
    					 window.location.replace(basePath+"index");
    	            });
    	            return false;
    			}
    		}); 
    }
    $(document).ready(function(){
    	//wait = setInterval(checkUKEY, 5000); 不检测是否重复登录
    });

    function setImg(){
    	$("#imgnva").attr("src",basePath+'downloadforlayui?temp='+new Date());
    }


    function logout(){
    	 mini.confirm("确定退出登录？", "提示",
    	            function (action) {
    	                if (action == "ok") {
    	                	window.location.href =cotextRoot+"logout";
    	                } else {
    	                }
    	            }
    	        );
    }
 	
    $(function () {


    	//加载数据字典表添加到localstorage中;
	   	 var storage=window.localStorage;
	   	/*  if(storage.getItem("dictData")==null ||storage.getItem("dictData")==""){ */
		   		$.ajax({  
		            type: "get",  
		            dataType: "json",  
		            url: basePath+"dict/list",  
		            data:null,  
		            success: function (data) {  
		            	var dictData=JSON.stringify(data);
		                 storage.setItem("dictData",dictData);
		            } 
		        });  
	   	// }
       
        
        //menu
        var menu = new Menu("#mainMenu", {
            itemclick: function (item) {
                if (!item.children) {
                    activeTab(item);
                }
            }
        });

        $("#layui-this").click();//默认选中第一个
        
        //dropdown
        $(".dropdown-toggle").mouseover(function (event) {
            $(this).parent().addClass("open");
            return false;
        });
        /* 
        $("#navmenu").mouseout(function (event) {
        	 $(".dropdown").removeClass("open");
        });
*/
        $("#menunav").mouseleave(function (event) {
            $(".dropdown").removeClass("open");
        }); 
    });
 	
 
 
 /*]]>*/
</script>
</html>